package cn.gson.springboot.controllers;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONArray;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;

import cn.gson.springboot.model.service.PricingYkService;
@Controller
public class PricingYkController {
	@Autowired
	private PricingYkService ps;
	
	//显示调价界面
	@RequestMapping("yaoku-tiaojia")
	public void yaokuTiaojia(Model model) {
	}
	/*//查询所有药品信息
	@RequestMapping("tiaojiabiaoge")
	@ResponseBody
	public Map<String,Object> hosLikeTableSmt(
			@RequestParam("page")int page,
			@RequestParam("rows")int rows){
		//进行分页
		Page<Object> pg = PageHelper.startPage(page, rows);
		JSONArray findall=ps.findAlltiaojia();
		//System.out.println("药品--"+findall);
		//进行数据格式转换和封装
		Map<String,Object> map = new HashMap<>();
		map.put("total", pg.getTotal());//封装总记录数
		map.put("rows", findall);//封装当前页的内容
			
		return map; 
	}*/
	
	/*//修改
	@RequestMapping("tiaojiaxiugai")
	@ResponseBody
	public void xiugai(Integer id2,Integer pricing_after_Price) {
		ps.update(id2,pricing_after_Price);
	}*/
}
